package com.mf.interfaceTest;

import com.mf.page.Actions;
import com.mf.mpos.pub.CommEnum;
import com.mf.mpos.pub.IUpdatePosProc;

public class UpdatePosProc implements IUpdatePosProc{
	
	private CommEnum.UPDATEERRORCODE errCode = CommEnum.UPDATEERRORCODE.OTHERERROR;
	/*
	 * 用户取消
	 */
	@Override
	public boolean Cancel()
	{
		return false;
	}
	
	/*
	 * 升级进度
	 */
	@Override
	public void UpdateProcess(int totalSize, int alreadySize)
	{
		String msg = "正在更新:\n总大小:" + String.valueOf(alreadySize) + "\n已下载大小:" + String.valueOf(totalSize);
		Actions.ShowUnBlockMsg("提示", msg, "", null);
	}
	
	/*
	 * 设置错误信息
	 */
	@Override
	public void SetErrorCode(CommEnum.UPDATEERRORCODE code)
	{
		errCode = code;
	}
	
	/*
	 * 获取错误信息
	 */
	public CommEnum.UPDATEERRORCODE GetErrorCode()
	{
		return errCode;
	}

}
